/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "predominantbiome")
@NamedQueries({
    @NamedQuery(name = "Predominantbiome.findAll", query = "SELECT p FROM Predominantbiome p"),
    @NamedQuery(name = "Predominantbiome.findByIdpredominantbiome", query = "SELECT p FROM Predominantbiome p WHERE p.idpredominantbiome = :idpredominantbiome"),
    @NamedQuery(name = "Predominantbiome.findByPredominantbiome", query = "SELECT p FROM Predominantbiome p WHERE p.predominantbiome = :predominantbiome")})
public class Predominantbiome implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idpredominantbiome")
    private Integer idpredominantbiome;
    @Column(name = "predominantbiome")
    private String predominantbiome;
    @OneToMany(mappedBy = "predominantbiome", fetch = FetchType.LAZY)
    private List<Monitoring> monitoringList;

    public Predominantbiome() {
    }

    public Predominantbiome(Integer idpredominantbiome) {
        this.idpredominantbiome = idpredominantbiome;
    }

    public Integer getIdpredominantbiome() {
        return idpredominantbiome;
    }

    public void setIdpredominantbiome(Integer idpredominantbiome) {
        this.idpredominantbiome = idpredominantbiome;
    }

    public String getPredominantbiome() {
        return predominantbiome;
    }

    public void setPredominantbiome(String predominantbiome) {
        this.predominantbiome = predominantbiome;
    }

    public List<Monitoring> getMonitoringList() {
        return monitoringList;
    }

    public void setMonitoringList(List<Monitoring> monitoringList) {
        this.monitoringList = monitoringList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idpredominantbiome != null ? idpredominantbiome.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Predominantbiome)) {
            return false;
        }
        Predominantbiome other = (Predominantbiome) object;
        if ((this.idpredominantbiome == null && other.idpredominantbiome != null) || (this.idpredominantbiome != null && !this.idpredominantbiome.equals(other.idpredominantbiome))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Predominantbiome[idpredominantbiome=" + idpredominantbiome + "]";
    }

}
